-
Notifications
You must be signed in to change notification settings - Fork 798
[SYCL] Disable dead arg elimination for free function kernels #19776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SYCL] Disable dead arg elimination for free function kernels #19776
Conversation
This reverts commit 34a11ca.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a LIT test for the change, see llvm/test/Transforms/DeadArgElim/sycl-kernels.ll
for an example of existing test
I've removed reference to the internal bug report from the PR's description. That's not how upstream development should be done. That said, the rest of the description was great and provides enough context for the change, so no additional actions needed. |
Something is wrong with codeownership. I'd expect |
… of https://github.com/lbushi25/llvm into disable_dead_arg_elimination_for_free_function_kernels
Re-requested review since this is high priority in the context of the next release. |
// Variadic template functions do not work with free function kernels. See | ||
// CMPLRLLVM-69528. | ||
// TODO: Uncomment the following line once the tracker is resolved. | ||
// test_func<variadic_templated<double>, double>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll leave review of this to @AlexeySachkov.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a regression from this patch, or is it something previously known?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a regression from this patch, or is it something previously known?
I believe it's previously known. The failure described by the tracker has been happening since the test was created, it just wasn't caught by pre-commit since it only manifests with optimizations disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a regression from this patch, or is it something previously known?
I believe it's previously known. The failure described by the tracker has been happening since the test was created, it just wasn't caught by pre-commit since it only manifests with optimizations disabled.
Ideally, such test should be disabled in a separate PR not to cause confusion, but I'm fine with the change since we do have a tracker to analyze the issue
// Variadic template functions do not work with free function kernels. See | ||
// CMPLRLLVM-69528. | ||
// TODO: Uncomment the following line once the tracker is resolved. | ||
// test_func<variadic_templated<double>, double>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a regression from this patch, or is it something previously known?
Co-authored-by: Alexey Sachkov <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving based on @AlexeySachkov 's comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though there are no remaining clang FE changes, looks like my approval is still needed for this PR.
The changes look good to me.
Both failing pre-commit jobs are failing at downloading the toolkit. Weirdly, re-running does not seem to fix it so it seems to be some persistent infrastructure bug. Either way, not related to my changes for sure. @intel/llvm-gatekeepers Can you merge this please? |
Seems like one more review needed for this to get merged. Ignore for now please! |
Failures unrelated, see #19767 |
This PR disables dead argument elimination for free function kernels. When using a free function kernel, the user sets the arguments manually using
handler::set_arg
but if certain arguments are optimized away in case they are not used, the implementation needs to be aware of this and remove the relevantset_arg
calls. Instead, its much more feasible to just disable dead arg elimination in this case.